Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

confort

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

confort

A library for incrementally build config objects through layering config files in many formats.

  • 0.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
667
increased by0.45%
Maintainers
1
Weekly downloads
 
Created
Source

Confort

A library for incrementaly build config objects through layering config files in many formats. Check out the features:

  • Support native objects input directly
  • Load config files
  • Merge configs chronologically
  • Supported formats so far: TOML (toml), JSON and YAML (yaml)
  • Available in the Deno ecosystem (see directory /deno)

Get Started on NodeJS

Install with: npm i -P confort

You also need to install the lib for parsing the type of file you mean to use like: npm i toml for parsing TOML

In your code:

const confort = require('confort');

// Constructor Forms
let conf = confort(); // Empty conf object
let conf = confort({ key: 'value', key2: 'value2' }); // Initial conf from objects
let conf = confort('./my-file.toml'); // Initial conf from file

// Adding incremental config layer
let c1 = confort(c1, { key: 'value' }); // => { key: 'value' }
c1 = confort(c1, { key: 'newValue', otherKey: 'value' }); // => { key: 'newValue', otherKey: 'value' }
c1 = confort(c1, './my-file.yml');

Get Started on Deno

import confort from 'https://deno.land/x/confort@0.2.0/deno/main.js'

// Constructor Forms
let conf = confort(); // Empty conf object
let conf = confort({ key: 'value', key2: 'value2' }); // Initial conf from objects
let conf = confort('./my-file.toml'); // Initial conf from file

// Adding incremental config layer
let c1 = confort(c1, { key: 'value' }); // => { key: 'value' }
c1 = confort(c1, { key: 'newValue', otherKey: 'value' }); // => { key: 'newValue', otherKey: 'value' }
c1 = confort(c1, './my-file.yml');

Reporting Bugs

If you have found any problems with this module, please:

  1. Open an issue.
  2. Describe what happened and how.
  3. Also in the issue text, reference the label ~bug.

We will make sure to take a look when time allows us.

Proposing Features

If you wish to get that awesome feature or have some advice for us, please:

  1. Open an issue.
  2. Describe your ideas.
  3. Also in the issue text, reference the label ~proposal.

Contributing

If you have spotted any enhancements to be made and is willing to get your hands dirty about it, fork us and submit your merge request so we can collaborate effectively.

Keywords

FAQs

Package last updated on 08 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc